package com.coocaa.ops.admin.async.log.model;

import com.coocaa.ops.common.core.biz.auth.entity.SysUserEntity;
import lombok.Data;
import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @author bijiahao
 * @date : 2018/5/4.
 * @description
 */
@Data
public class LogInfoModel {
    /**
     * 拦截方法切点
     */
    private ProceedingJoinPoint joinPoint;
    /**
     * 耗费时间
     */
    private Long costTime;
    /**
     * 方法执行返回值
     */
    private Object returnValue;

    private SysUserEntity userEntity;


    public LogInfoModel(ProceedingJoinPoint joinPoint, Long costTime, Object returnValue, SysUserEntity userEntity) {
        this.joinPoint = joinPoint;
        this.costTime = costTime;
        this.returnValue = returnValue;
        this.userEntity = userEntity;
    }


    public static LogInfoModel getLogInfoModel(ProceedingJoinPoint joinPoint, Long costTime, Object returnValue, SysUserEntity userEntity) {
        return new LogInfoModel(joinPoint, costTime, returnValue, userEntity);
    }
}
